package cn.thr.pethome.department.domain;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.thr.pethome.base.domain.BaseDomian;
import cn.thr.pethome.employee.domain.Employee;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

/**
 * <p>
 * 
 * </p>
 *
 * @author thr
 * @since 2023-01-15
 */
@Data
public class Department extends BaseDomian{

    private static final long serialVersionUID = 1L;

    /**
     * 部门编号
     */
    @Excel(name = "部门编号" ,orderNum = "1", width = 30, isImportField = "true_st")
    private String sn;
    /**
     * 部门名称
     */
    @Excel(name = "部门名称" ,orderNum = "1", width = 30, isImportField = "true_st")
    private String name;
    /**
     * 部门的上级分类层级id
     */
    private String dirPath;
    /**
     * 部门状态，0禁用，1启用
     */
    @Excel(name = "状态" ,orderNum = "4",replace ={"关闭_0","开启_1"} , width = 30, isImportField = "true_st")
    private Integer state;
    /**
     * 部门管理员，关联Employee表id
     */
    private Long manager_id;
    /**
     * 上级部门
     */
    private Long parent_id;
    private Long shop_id;

    private Employee manager;
    private  Department parent;

    //children 不能写错 因为element要使用  这是部门树  必须实例化
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList();
}
